<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="root"></div>
    <!-- 1. 引入react的文件
        react.js和react-dom.js
        注意: 必须先引入react.js,然后再引入react-dom.js
        react.js中提供了一个React对象
        react-dom.js中提供了一个ReactDOM对象
     -->
    <script src="./js/react.development.js"></script>
    <script src="./js/react-dom.development.js"></script>
    <script>
      const h1 = React.createElement('h1', {}, 'hello', 'world', 'xxx', 'yyy')
      const label = React.createElement('label', { htmlFor: 'test' })
      const p = React.createElement(
        'p',
        { id: 'test', className: 'one' },
        h1,
        label
      )

      const root = ReactDOM.createRoot(document.getElementById('root'))
      root.render(p)
    </script>
  </body>
</html>
